#pragma once
#include "WinDefines.h"
#include "HSException.h"
#include <vector>
#include <dxgi.h>
#include <wrl.h>
#include <d3dcompiler.h>
#include "UIManager.h"
#include <memory>
class Graphics
{
	friend class GraphicsResource;
public:
	Graphics(HWND hwnd,int width,int height);
	Graphics() = default;
	Graphics(const Graphics&) = delete;
	~Graphics() = default;
	void BeginFrame();
	void EndFrame();
	void ClearBuffer(const float*);
	ID3D11RenderTargetView** GetRTV();
	ID3D11DepthStencilView* GetDSV();
	UINT GetWidth() const { return width; }
	UINT GetHeight() const { return height; }
private:
	UINT width;
	UINT height;
private:
	Microsoft::WRL::ComPtr<ID3D11Device> devicePtr;
	Microsoft::WRL::ComPtr<ID3D11DeviceContext> contextPtr;
	Microsoft::WRL::ComPtr<IDXGISwapChain> swapchainPtr;
	Microsoft::WRL::ComPtr<ID3D11RenderTargetView> RTV_Ptr;
	Microsoft::WRL::ComPtr<ID3D11DepthStencilView> DSV_Ptr;
	std::unique_ptr<UIManager> m_pUIManager;
};